package com.leo.foodmaster.admin.foodMaterial.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.leo.foodmaster.admin.foodMaterial.entity.FoodMaterialType;
import com.baomidou.mybatisplus.extension.service.IService;
import com.leo.foodmaster.commons.entity.Result;

/**
 * <p>
 *  食材类型服务类
 * </p>
 *
 * @author Leo
 * @since 2021-07-14
 */
public interface IFoodMaterialTypeService extends IService<FoodMaterialType> {

    /**
     * 条件分页查询食材类型
     * @param page 分页参数
     * @param name 食材类型名称
     * @return IPage<FoodMaterialType>
     */
    IPage<FoodMaterialType> getFoodMaterialTypePageList(Page<FoodMaterialType> page, String name);

    /**
     * 删除食材类型
     * @param foodMaterialTypeIds 食材类型Ids
     * @return Result<Object>
     */
    Result<Object> deleteFoodMaterialType(String foodMaterialTypeIds);

    /**
     * 新增食材分类
     * @param foodMaterialType 食材分类信息
     * @return boolean
     */
    boolean add(FoodMaterialType foodMaterialType);

}
